import os
import settings
from naie.context import Context
import moxing as mox

print('==========当前工程目录==========')
print(os.path.dirname(os.path.abspath(__file__)))

os.system('python extract_online_dataset.py')

os.system('python train.py')

mox.file.copy_parallel(settings.LOG_DIR, os.path.join(Context.get_output_path(), settings.LOG_DIR))
mox.file.copy_parallel(settings.CHECKPOINT_PATH, os.path.join(Context.get_output_path(), settings.CHECKPOINT_PATH))
print('==========持久保存目录==========')
print(os.path.join(Context.get_output_path()))

os.system('python test.py')
mox.file.copy(os.path.join(settings.RESULT_DIR, 'ans.csv'), os.path.join(Context.get_output_path(), 'ans.csv'))
